---
title: MCP Server
description: Use the Model Context Protocol with Plate.
---

Plate has an official MCP server. This lets AI tools understand and work with our rich ecosystem of editor templates, plugin configurations, UI components, and documentation.

## What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs. This is useful for Plate because you can now give your AI-assisted IDE direct access to hundreds of Plate resources.

## Using MCP with Plate

Your AI can now:

- Access to all our editor templates, plugins, and UI components
- Access our complete documentation, including guides and API references
- Generate code with the right imports and configurations
- Help with setting up full editor instances or specific features
- Keep your Plate configurations and components up to date

Try asking your AI:

```bash
"Set up a Plate editor with basic formatting and table support"
"Help me understand how the Plate AI plugin works"
"Update my editor components to the latest version"
```

## How it works

The Plate ecosystem provides structured information that MCP-enabled tools can read from a unified registry that includes:

- Editor templates and plugin configurations
- UI components and their dependencies
- Documentation files and migration guides
- API references and examples

This comprehensive registry ensures AI tools have complete context for both code generation and understanding Plate's features.

## Local Documentation

For teams working with Plate, integrating local documentation is key to maximizing the benefits of MCP. We recommend following our [Local Docs](/docs/installation/docs) guide to set this up. This approach offers several advantages for AI-powered development:

-   **Version-Specific Context:** AI tools gain direct access to documentation that precisely matches your project's Plate version, ensuring relevant and accurate assistance.
-   **Superior to `llms.txt`:** Unlike simply dumping documentation into a text file (which can struggle with large volumes and context limits), a structured local setup allows AI to efficiently access the specific information it needs.
-   **Integrated Workflow:** Documentation becomes a part of your codebase, simplifying updates, version control, and team collaboration.
-   **AI-Ready:** A well-structured local documentation allows AI to more effectively assist with tasks such as generating code, creating summaries, or explaining complex Plate features within the context of your project.

## Setup MCP

Follow these steps to set up MCP with Plate:

### Step 1: Start from our basic template

Run this command to initialize your project with the basic editor template:

```bash
npx shadcn@latest add https://platejs.org/r/editor-basic
```

### Step 2: Add MCP config

Configure your registry in your `components.json` file:

```json
{
  "registries": {
    "@platejs": "https://platejs.org/r/{name}.json"
  }
}
```

### Step 3: Configure your IDE

Choose the configuration for your IDE:

#### Cursor

Copy and paste into `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "plate": {
      "description": "Plate editors, plugins and components",
      "type": "stdio",
      "command": "npx",
      "args": [
        "shadcn@latest",
        "mcp"
      ]
    }
  }
}
```

#### VS Code

Copy and paste into `.vscode/mcp.json` in your workspace:

```json
{
  "servers": {
    "plate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "shadcn@latest",
        "mcp"
      ]
    }
  }
}
```

#### Claude

Copy and paste into `.mcp.json`:

```json
{
  "mcpServers": {
    "plate": {
      "description": "Plate editors, plugins and components",
      "type": "stdio",
      "command": "npx",
      "args": [
        "shadcn@latest",
        "mcp"
      ]
    }
  }
}
```

#### CodeX

1. Open or create the file `~/.codex/config.toml`
2. Add the following configuration:

```toml
[mcp_servers.plate]
command = "npx"
args = ["shadcn@latest", "mcp"]
```

3. Restart CodeX to load the MCP server

## Best Practices

1.  **Local Documentation:** Set up local documentation to give AI tools version-specific context. This ensures more accurate assistance, especially for larger projects.
2.  **AI-Assisted Development:** Let AI handle editor setup, plugin integration, and component additions.
3.  **Manual Fallback:** Use the [shadcn CLI](/docs/components/cli) for manual additions when needed (e.g., with small models or outdated documentation).
4.  **Stay Updated:** Keep both your Plate components and local documentation in sync. Check our [changelog](/docs/components/changelog) regularly or ask your AI about updates.
